import 'package:flutter/material.dart';

class MymessagesDetails extends StatefulWidget {
  final String creatTime;
  final String title;
  final String content;

  MymessagesDetails(this.creatTime, this.title, this.content);

  @override
  _MymessagesDetailsState createState() => _MymessagesDetailsState();
}

class _MymessagesDetailsState extends State<MymessagesDetails> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: Color(0xFFF6F5F5),
        appBar: AppBar(
          centerTitle: true,
          backgroundColor: Colors.white,
          leading: IconButton(
            icon: Icon(
              Icons.arrow_back_ios,
              color: Colors.grey,
            ),
            onPressed: () => Navigator.pop(context),
          ),
          title: Text(
            '消息详情',
            style: TextStyle(
              fontSize: 16,
              color: Colors.black,
            ),
          ),
        ),
        body: Container(
//          color: Colors.white,
          margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
          child: Column(
            children: <Widget>[
              Container(
                alignment: Alignment.centerLeft,
                color: Colors.white,
                padding: EdgeInsets.fromLTRB(20.0, 10.0, 2.0, 0.0),
                margin: EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 0.0),
                child: Text(
                  widget.title,
                  style: TextStyle(fontSize: 16.0, color: Color(0xFF333333)),
                ),
              ),
              Container(
                alignment: Alignment.centerLeft,
                color: Colors.white,
                padding: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 10.0),
                child: Row(
                  children: <Widget>[
                    Image.asset(
                      'images/icon_clocks.png',
//                      'images/icon_user_head.png',
                      height: 25.0,
                      width: 25.0,
                    ),
                    Container(
                      margin: EdgeInsets.fromLTRB(15.0, 0.0, 0.0, 0.0),
                      child: Text(widget.creatTime,
                          style: TextStyle(
                              fontSize: 16.0, color: Color(0xFF333333))),
                    ),
                  ],
                ),
              ),
              Container(
                alignment: Alignment.centerLeft,
                color: Colors.white,
                padding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
                child: Text(
                  widget.content,
                  style: TextStyle(fontSize: 16.0, color: Color(0xFF333333)),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
